Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enabled absolute positionning of the cloned node #45

Merged
merged 4 commits into from
Mar 16, 2017

Conversation

Badra00
Copy link
Contributor

@Badra00 Badra00 commented Mar 7, 2017

Hello,
We find an issue when using enableGhostResizing in a specific case when we have a container wich contain the element and a scale3D on it.
The cloned element will not be at the same place.
Here is a fix for it.

@codecov-io
Copy link

codecov-io commented Mar 7, 2017

Codecov Report

Merging #45 into master will increase coverage by 0.08%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master      #45      +/-   ##
==========================================
+ Coverage   96.06%   96.15%   +0.08%     
==========================================
  Files           4        4              
  Lines         229      234       +5     
  Branches       40       41       +1     
==========================================
+ Hits          220      225       +5     
  Misses          4        4              
  Partials        5        5
Impacted Files Coverage Δ
src/resizable.directive.ts 96.96% <100%> (+0.07%)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 210e128...3a0423b. Read the comment docs.

Copy link
Owner

@mattlewis92 mattlewis92 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great, thank you!

Would you also be able to add a basic integration test for the functionality you added?

  • create a new component in the test file like this
  • apply the layout changes from this commit
  • Prefix the CSS transform property with -webkit- so it works
  • use the new option to position the element absolutely
  • finally add a test that asserts that the position of the ghost element is correct. You can access the ghost element and assert its styles like this

@@ -213,6 +232,11 @@ export class Resizable implements OnInit, OnDestroy, AfterViewInit {
@Input() resizeCursorPrecision: number = 3;

/**
* If we want to position cloned node with absolute position
*/
@Input() enableAbsolutePositioning: boolean = false;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To make this more verbose, can you rename this to

@Input() ghostElementPositioning: 'fixed' | 'absolute' = 'fixed';

@mattlewis92
Copy link
Owner

Looks great to me, thank you! 😀 Will merge and cut a new release as soon as I'm near a computer.

@mattlewis92 mattlewis92 merged commit b77c9fc into mattlewis92:master Mar 16, 2017
@mattlewis92
Copy link
Owner

Sorry about the delay, released as 0.8.0 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants